// 引入网络数据请求
import './index.js';

export function reqSwiperList(){
  return uni.$http.get('/api/public/v1/home/swiperdata');
}
export function reqNavList(){
  return uni.$http.get('/api/public/v1/home/catitems')
}
export function reqFloorList(){
  return uni.$http.get('/api/public/v1/home/floordata')
}

export function reqCateList(){
  return uni.$http.get('/api/public/v1/categories')
}

export function reqSearchList(query){
  return uni.$http.get('/api/public/v1/goods/qsearch',{query})
}

export function reqGoodsList(query){
  return uni.$http.get('/api/public/v1/goods/search',query)
}

export function reqGoodDetail(id){
  return uni.$http.get('/api/public/v1/goods/detail?goods_id='+id)
}

export function login(query){
  return uni.$http.post('/api/public/v1/users/wxlogin',query)
}

export function CreatePay(data){
  return uni.$http.post('/api/public/v1/my/order/create',data)
}

export function prePay(number){
  return uni.$http.post('/api/public/v1/my/orders/req_unifiedorder',number)
}

export function payRes(number){
  return uni.$http.post('/api/public/v1/my/orders/chkOrder',number) 
}